package net.shop.biz.db.impl;

import java.io.Serializable;

import net.shop.biz.db.BaseService;
import net.shop.dal.dao.BaseDao;

public class BaseServiceImpl<T, PK extends Serializable> implements BaseService<T, PK>{
	
	private BaseDao<T,PK> baseDao;

	public BaseDao<T,PK> getBaseDao() {
		return baseDao;
	}

	public void setBaseDao(BaseDao<T,PK> baseDao) {
		this.baseDao = baseDao;
	}

	public void save(T entity) {
		baseDao.save(entity);
	}
	
	public int delete(T entity) {
		return baseDao.delete(entity);
	}
	
	public int delete(PK id) {
		return baseDao.delete(id);
	}
	
	public int modify(T entity) {
		return baseDao.modify(entity);
	}
	
	public int getAllCount() {
		return baseDao.getAllCount();
	}
	

	public T get(PK id) {
		return baseDao.get(id);
	}
}
